# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=wifichannelmonitor
pkgver=1.70
pkgrel=1
pkgdesc='A utility for Windows that captures wifi traffic on the channel you choose, using Microsoft Network Monitor capture driver.'
url='https://www.nirsoft.net/utils/wifi_channel_monitor.html'
groups=('blackarch' 'blackarch-windows' 'blackarch-wireless'
        'blackarch-sniffer' 'blackarch-networking')
license=('custom:unknown')
arch=('any')
makedepends=('unzip')
source=('http://www.nirsoft.net/utils/wifichannelmonitor.zip'
        'http://www.nirsoft.net/utils/wifichannelmonitor-x64.zip')
sha512sums=('1fb0d65613cec99dbe89cbb606962bc2262d30e54bcde3164010f2bec1246633d3906270d4b0224c5ba6439a44169653db247cd0973ffb76940ef8173f8c6bf1'
            'd47616515eaab8b54f43116fa8f8d59dd8e795250304d4f4ccf45a1c486e88ca21f6df3ab16f58d0d14085bb7fff0f12606ab72c79e0bc55a7ef83b3059b4df8')
noextract=("$pkgname.zip" "$pkgname-x64.zip")


package() {
  install -dm 755 "$pkgdir/usr/share/windows/$pkgname"

  unzip "$pkgname.zip"

  install -Dm 644 -t "$pkgdir/usr/share/windows/$pkgname" readme.txt \
    WifiChannelMonitor.chm WifiChannelMonitor.exe

  rm readme.txt WifiChannelMonitor.chm WifiChannelMonitor.exe

  unzip "$pkgname-x64.zip"

  install -Dm 644 WifiChannelMonitor.exe \
    "$pkgdir/usr/share/windows/$pkgname/WifiChannelMonitor-x64.exe"

  rm *.zip
}

